home *** CD-ROM | disk | FTP | other *** search
- // Design Time Java PictureButton implementation. (HPP)
-
- #ifndef _DTJPICBN_HPP
- #define _DTJPICBN_HPP
-
- #include "dtjcomp.hpp"
-
- enum LabelPosition {
- eLabelPositionTOP = 1,
- eLabelPositionBOTTOM = 2
- };
-
- enum URLType {
- ABSOLUTE_URL,
- DOCUMENT_BASED_URL,
- CODE_BASED_URL
- };
-
- class METAEXPORTCLASSDEF DTJPictureButton : public DTJComponent
- {
- public:
- DTJPictureButton( const MetaObject * pMetaObj );
- virtual ~DTJPictureButton();
-
- // URLType
- //
- // The URL type: Absolute or relative based on the URL of
- // the document or of the applet code.
-
- virtual URLType GetURLType() const;
- virtual WBool SetURLType( URLType t );
-
- //
- // DefaultStyle
- //
- // The style with which new instances are created. Default
- // implementation returns GetWindow()->GetDefaultStyle().
-
- virtual WStyle GetDefaultStyle() const;
-
- virtual WBool Create( WWindow * parent, const WRect & r,
- const WChar * text, WStyle style,
- WStyle exStyle, void * data, WBool isLoading );
-
- virtual void GenerateCode( MMCodeGeneration mmCodeGen,
- ostream& src,
- MMCodeGenerationParms& pGenParms );
-
- virtual void GenerateTextProp( const WString& objPrefix, ostream& src,
- MMJCodeGenerationParms * ) const;
-
- // The following properties are for C++ form painting only.
- virtual WLong GetInsetsTop() const;
- virtual void SetInsetsTop( WLong value );
- virtual WLong GetInsetsBottom() const;
- virtual void SetInsetsBottom( WLong value );
- virtual WLong GetInsetsLeft() const;
- virtual void SetInsetsLeft( WLong value );
- virtual WLong GetInsetsRight() const;
- virtual void SetInsetsRight( WLong value );
- virtual const WChar * GetURL() const;
- virtual void SetURL( const WString & url );
- virtual LabelPosition GetLabelPosition() const;
- virtual void SetLabelPosition( LabelPosition value );
-
- protected:
- virtual void GenerateCreate( const WString& objPrefix,
- ostream& src,
- MMJCodeGenerationParms* pGenParms ) const;
-
- private:
- WLong _insets_top;
- WLong _insets_bottom;
- WLong _insets_left;
- WLong _insets_right;
-
- URLType _url_type;
- WString _url;
-
- LabelPosition _label_position;
- };
-
- extern WBool METAEXPORTDEF DP_JPictureButtonEnum( const DTObject *, const MMBaseProperty * );
-
- // needed for mdreader
- typedef DTJPictureButton DTpowersoft__dot__powerj__dot__ui__dot__PictureButton__dot__102;
- typedef WPictureButton powersoft__dot__powerj__dot__ui__dot__PictureButton__dot__102;
-
- #endif // _DTJPICBN_HPP
-